<template>
  <div>
    <p>请选择你喜欢的专栏</p>
    <div class="box" v-for="(item, index) in arr" :key="index">
      <!-- <input type="checkbox" name="" id="" value="" @click="add(item)">{{item}} -->
      <input type="checkbox" v-model="obj" :value="item" />{{ item }}
    </div>
    <br />
    <div>
      <ul>
        <li v-for="item in obj" :key="item">{{ item }}</li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: ["科幻", "喜剧", "动漫", "冒险", "科技", "军事", "娱乐", "奇闻"],
      obj: [],
    };
  },
};
</script>

<style scoped>
.box {
  float: left;
}
</style>
